package com.michael.demos.springboot.openapi.exception;

import com.michael.demos.springboot.openapi.service.ErrorCode;

/**
 * 类功能描述:
 * <pre>
 *   API调用异常
 * </pre>
 *
 * @author Michael
 * @version 1.0
 * @date 2020/11/26 17:37
 */
public class APIException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private final ErrorCode errorCode;

    public APIException(ErrorCode errorCode) {
        this.errorCode = errorCode;
    }

    public ErrorCode getErrorCode() {
        return errorCode;
    }
}
